package cn.com.api.service.impl.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_products;

import cn.com.api.mapper.ApiT_productsMapper;

import cn.com.api.service.ApiT_productsService;

/**
 * 
 **/
@Service
public class T_productsServiceImplBase {
	@Autowired
	private ApiT_productsMapper apiT_productsMapper;
    
    // 根据id获取
	public ApiT_products findT_productsById(Long id){
		ApiT_products t_products = apiT_productsMapper.findT_productsById( id );
		return t_products;
	}
    
    //查看数据集
	public List<ApiT_products> findT_productss(){
        List<ApiT_products> t_productss = apiT_productsMapper.findT_productss();
		return t_productss;
    }
    
	// 添加
	public int insertT_products(ApiT_products t_products){
		int ret_I= apiT_productsMapper.insertT_products(t_products);
		return ret_I;
	}

	// 修改
	public int updateT_products(ApiT_products t_products){
		int ret_I= apiT_productsMapper.updateT_products(t_products);
		return ret_I;
	}
	
    // 删除
	public int deleteT_products(Integer id){
		int ret_I= apiT_productsMapper.deleteT_products( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		
	//删除根据Goods_id
    public int T_productsDeleteByGoods_id(String goods_id){
		int ret_I= apiT_productsMapper.T_productsDeleteByGoods_id(goods_id);
		return ret_I;
	}
	
    //获取根据Goods_id
    public List<ApiT_products> findT_productssByGoods_id(String goods_id){
        List<ApiT_products> t_productss = apiT_productsMapper.findT_productssByGoods_id(goods_id);
		return t_productss;
    }

		

	//region Indexs revelant
    
    
    
    
}


